{extend name="layout/main" /}

{block name="header"}

{/block}

{block name="content"}
<section class="panel">
    <header class="panel-heading">
        <h4>视频管理</h4>
    </header>
    <div class="panel-body" style="padding-bottom: 50px">
        <form class="form-horizontal" action="{:url('article/index')}">
            <div class="form-group">
                <a type="button" href="{:url('/admin/article/videoadd')}" class="btn btn-info">添加视频</a>
            </div>
        </form>
        <table class="table table-bordered table-striped no-margin">
            <thead>
            <tr>
                <th class="text-center">序号</th>
                <th class="text-center">标题</th>
                <th class="text-center">观看量</th>
                <th class="text-center">视频</th>
                <th class="text-center">排序</th>
                <th class="text-center">创建时间</th>
                <th class="text-center">操作</th>
            </tr>
            </thead>
            <tbody>
            {if !empty($list)}
            {foreach $list as $entity}
            <tr>
                <td class="text-center">{$entity.id}</td>
                <td class="text-center">{$entity.title}</td>
                <td class="text-center">{$entity.click_num}</td>
                <td class="text-center">
                    <span class='color-desc'>
                        <video  width="200px" height="200px" class="image_click" src="__PUBLIC__{$entity.pic}" controls="controls">' +'您的浏览器不支持 video 标签。' +'</video>
                    </span>
                </td>
                <td class="text-center">{$entity.sort}</td>
                <td class="text-center">{$entity.update_time|date="Y-m-d H:i:s"}</td>
                <td class="text-center">
                    <a href="{:url('article/videoedit',['id'=>$entity['id']])}" class="btn btn-xs btn-info">编辑</a>

                    <a data-url="{:url('article/videodel',['id'=>$entity.id])}" onclick="main.ajaxDelete(this)"
                       data-msg="确定要删除该视频吗？" class="btn btn-xs btn-danger">删除</a>

                </td>
            </tr>
            {/foreach}
            {else /}
            <tr class="text-center">
                <td colspan="5">暂无数据</td>
            </tr>
            {/if}
            </tbody>
        </table>

    </div>
</section>
<script>
    $(function(){
        $(".image_click").zoomify();
    });
</script>
{/block}


{block name="footer"}

{/block}
